package util;

/**
 * 用户实体类，表示系统用户
 */
public class User {
    private int id;
    private String username;
    private String password;
    private String name;
    private String contact;
    private String region;
    private int points;
    private double carbonReduction;
    // 新增字段
    private String gender;
    private String birthDate;
    private String email;
    private String hobbies;
    private String preferredTravelMode;
    private boolean profilePublic;
    private String occupation;

    // 构造函数
    public User() {
    }

    public User(String username, String password, String name, String contact, String region) {
        this.username = username;
        this.password = password;
        this.name = name;
        this.contact = contact;
        this.region = region;
        this.points = 0;
        this.carbonReduction = 0.0;
        this.gender = "";
        this.birthDate = "";
        this.email = "";
        this.hobbies = "";
        this.preferredTravelMode = "";
        this.profilePublic = true;
        this.occupation = "";
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public int getPoints() {
        return points;
    }

    public void setPoints(int points) {
        this.points = points;
    }

    public double getCarbonReduction() {
        return carbonReduction;
    }

    public void setCarbonReduction(double carbonReduction) {
        this.carbonReduction = carbonReduction;
    }

    // 新增字段的getter和setter
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getHobbies() {
        return hobbies;
    }

    public void setHobbies(String hobbies) {
        this.hobbies = hobbies;
    }

    public String getPreferredTravelMode() {
        return preferredTravelMode;
    }

    public void setPreferredTravelMode(String preferredTravelMode) {
        this.preferredTravelMode = preferredTravelMode;
    }

    public boolean isProfilePublic() {
        return profilePublic;
    }

    public void setProfilePublic(boolean profilePublic) {
        this.profilePublic = profilePublic;
    }

    public String getOccupation() {
        return occupation;
    }

    public void setOccupation(String occupation) {
        this.occupation = occupation;
    }
}
